package starfire.gui.siteTree;

import javax.swing.tree.*;
import java.util.Enumeration;
import starfire.ftp.FtpSite;

/**
 * <p>Title: JFtp</p>
 * <p>Description: ftp client</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author starfire
 * @version 1.0
 */

public class SiteTreeNode  extends DefaultMutableTreeNode {
  private FtpSite site;

  public SiteTreeNode(FtpSite site) {
    this.setUserObject(site);
    this.site = site;
  }

  public TreeNode getChildAt(int childIndex) {
    /**@todo Implement this javax.swing.tree.TreeNode method*/
    throw new java.lang.UnsupportedOperationException("Method getChildAt() not yet implemented.");
  }

  public boolean getAllowsChildren() {
    return false;
  }

  public boolean isLeaf() {
    return true;
  }

  public FtpSite getFtpSite()
  {
    return site;
  }

  public void setFtpSite (FtpSite site)
  {
    this.site = site;
  }

  public String toString()
  {
    return site.getLabel();
  }

}